﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TabCustomerList.ascx.cs" Inherits="Admin_Parts_TabCustomerList" %>
<%@ Register src="~/Admin/Parts/Notification.ascx" tagname="Notification" tagprefix="uc3" %>
<%@ Register src="~/Admin/Parts/Pagging.ascx" tagname="Pagging" tagprefix="uc4" %>
<style type="text/css">
    .style1
    {
        width: 104px;
    }
</style>
<div class="tab-content default-tab" id="tab1"> 
<!-- This is the target div. id must match the href of this div's tab -->
					
<!-- Start Notification -->
<uc3:Notification ID="Notification1" runat="server" />
<!-- End Notification -->
		
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="MaKhachHang" 
    DataSourceID="LinqDataSource1" PageSize="20">
    <Columns>
        <asp:TemplateField InsertVisible="False" SortExpression="MaKhachHang">
            <EditItemTemplate>
                <asp:CheckBox ID="CheckBox2" runat="server" />
            </EditItemTemplate>
            <HeaderTemplate>
                <input id="Checkbox1" class="check-all" type="checkbox" runat="server"/>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Họ tên" SortExpression="TenKhachHang">
            <EditItemTemplate>
                <asp:FormView ID="FormView1" runat="server" DataSourceID="LinqDataSource1">
                    <EditItemTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label11" runat="server" Text="Tên khách hàng:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TenKhachHang") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label10" runat="server" Text="Số CMND:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("CMND") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label9" runat="server" Text="Ngày sinh:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox3" runat="server" 
                                        Text='<%# Bind("NgaySinh", "{0:d}") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label8" runat="server" Text="Địa chỉ:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("DiaChi") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label7" runat="server" Text="Địa chỉ 2:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("DiaChiThuHai") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label6" runat="server" Text="Điện thoại:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("SoDienThoai") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label5" runat="server" Text="Điện thoại bàn:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("DienThoaiCoDinh") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label4" runat="server" Text="Thẻ thanh toán:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("TheThanhToan") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style1">
                                    <asp:Label ID="Label3" runat="server" Text="Tài khoản:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("TaiKhoan") %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="Phiếu đặt hàng:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("TaiKhoan") %>'></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </EditItemTemplate>
                </asp:FormView>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("TenKhachHang") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="CMND" HeaderText="CMND" SortExpression="CMND" />
        <asp:BoundField DataField="NgaySinh" HeaderText="Ngày sinh" 
            SortExpression="NgaySinh" />
        <asp:BoundField DataField="DiaChi" HeaderText="Địa chỉ" 
            SortExpression="DiaChi" />
        <asp:BoundField DataField="DiaChiThuHai" HeaderText="Địa chỉ 2" 
            SortExpression="DiaChiThuHai" />
        <asp:BoundField DataField="SoDienThoai" HeaderText="Điện thoại" 
            SortExpression="SoDienThoai" />
        <asp:BoundField DataField="DienThoaiCoDinh" HeaderText="Điện thoại bàn" 
            SortExpression="DienThoaiCoDinh" />
        <asp:TemplateField HeaderText="Tác vụ">
            <EditItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update"></asp:LinkButton>
                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                    CommandName="Cancel" Text="Cancel"></asp:LinkButton>
            </EditItemTemplate>
            <ItemTemplate>
                &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" 
                    CommandName="Edit"
                    CommandArgument='<%# Eval("MaKhachHang") %>' 
                    PostBackUrl="~/Admin/CustomerManager.aspx"
                    ImageUrl="~/Admin/Images/icons/pencil.png" />
                <asp:ImageButton ID="ImageButton2" runat="server"
                    CommandName="Delete" 
                    CommandArgument='<%# Eval("MaKhachHang") %>' 
                    PostBackUrl="~/Admin/CustomerManager.aspx"
                    ImageUrl="~/Admin/Images/icons/cross.png" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>

        <div class="bulk-actions align-left">
						<select name="dropdown">
							<option value="None">Chọn 1 tác vụ</option>
							<option value="Edit">Cập nhật</option>
							<option value="Delete">Xóa</option>
						</select>
						<a class="button" href="#">Áp dụng</a>
      </div>										 
<!-- Start Pagging -->
<uc4:Pagging ID="Pagging1" runat="server" />
<!-- End Pagging -->			
</div>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
    ContextTypeName="NhaKinhDoanhDataContext" EnableDelete="True" 
    EnableUpdate="True" TableName="KhachHangs">
</asp:LinqDataSource>